package com.luobd.bpm.input;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "流程部署 - 字符串")
@Data
public class ProcessDeploymentStringInput extends ProcessDeploymentInput{

    @ApiModelProperty(value = "流程定义xml字符串", required = true)
    private String bpmnXml;


    public static void main(String[] args) {

        String str = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                "<definitions xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\" xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\" xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\" typeLanguage=\"http://www.w3.org/2001/XMLSchema\" expressionLanguage=\"http://www.w3.org/1999/XPath\" targetNamespace=\"http://www.activiti.org/processdef\">\n" +
                "  <process id=\"leave\" name=\"leave\" isExecutable=\"true\">\n" +
                "    <startEvent id=\"sid-eee891d3-1873-4fc3-aa82-338b8e7df851\"/>\n" +
                "    <userTask id=\"sid-4f834027-45ea-4f4f-86e5-e70a0fa8e2d7\"/>\n" +
                "    <sequenceFlow id=\"sid-a325756f-4842-4fa6-a5e5-57cdbb3b2e51\" sourceRef=\"sid-eee891d3-1873-4fc3-aa82-338b8e7df851\" targetRef=\"sid-4f834027-45ea-4f4f-86e5-e70a0fa8e2d7\"/>\n" +
                "    <endEvent id=\"sid-52a547a6-0dbc-4dcb-b194-eff6bcd61b53\"/>\n" +
                "    <sequenceFlow id=\"sid-0402193b-6cc2-45cd-b262-a31973920b08\" sourceRef=\"sid-4f834027-45ea-4f4f-86e5-e70a0fa8e2d7\" targetRef=\"sid-52a547a6-0dbc-4dcb-b194-eff6bcd61b53\"/>\n" +
                "  </process>\n" +
                "  <bpmndi:BPMNDiagram id=\"BPMNDiagram_leave\">\n" +
                "    <bpmndi:BPMNPlane bpmnElement=\"leave\" id=\"BPMNPlane_leave\">\n" +
                "      <bpmndi:BPMNShape id=\"shape-8ff29273-d985-4aec-b17b-5251e58b8a34\" bpmnElement=\"sid-eee891d3-1873-4fc3-aa82-338b8e7df851\">\n" +
                "        <omgdc:Bounds x=\"-130.0\" y=\"-35.0\" width=\"30.0\" height=\"30.0\"/>\n" +
                "      </bpmndi:BPMNShape>\n" +
                "      <bpmndi:BPMNShape id=\"shape-477af378-1302-4a95-8a06-20de1262f3dc\" bpmnElement=\"sid-4f834027-45ea-4f4f-86e5-e70a0fa8e2d7\">\n" +
                "        <omgdc:Bounds x=\"-35.0\" y=\"-50.0\" width=\"100.0\" height=\"80.0\"/>\n" +
                "      </bpmndi:BPMNShape>\n" +
                "      <bpmndi:BPMNEdge id=\"edge-8f73e1c7-9635-459d-8430-046b69904e0f\" bpmnElement=\"sid-a325756f-4842-4fa6-a5e5-57cdbb3b2e51\">\n" +
                "        <omgdi:waypoint x=\"-100.0\" y=\"-12.5\"/>\n" +
                "        <omgdi:waypoint x=\"-35.0\" y=\"-10.0\"/>\n" +
                "      </bpmndi:BPMNEdge>\n" +
                "      <bpmndi:BPMNShape id=\"shape-7ac0271b-d4b1-4c29-bd68-cd7915a2bee1\" bpmnElement=\"sid-52a547a6-0dbc-4dcb-b194-eff6bcd61b53\">\n" +
                "        <omgdc:Bounds x=\"160.0\" y=\"-15.0\" width=\"30.0\" height=\"30.0\"/>\n" +
                "      </bpmndi:BPMNShape>\n" +
                "      <bpmndi:BPMNEdge id=\"edge-ba7523c9-6b19-48d4-a459-d34f1ab265bb\" bpmnElement=\"sid-0402193b-6cc2-45cd-b262-a31973920b08\">\n" +
                "        <omgdi:waypoint x=\"65.0\" y=\"-10.0\"/>\n" +
                "        <omgdi:waypoint x=\"160.0\" y=\"-7.5\"/>\n" +
                "      </bpmndi:BPMNEdge>\n" +
                "    </bpmndi:BPMNPlane>\n" +
                "  </bpmndi:BPMNDiagram>\n" +
                "</definitions>\n";


        System.out.println(str.replace("\"", "'"));
    }


}
